$.ajax({
    url: "/RuanJianKeShe/getCourseBySno",
    type: "post",
    data: {
        "msg":"getCourseBySno"
    },
    dataType: "json",
    success: function (data) {
        showCourseBySno(data.myCourseList);

    },
    error: function () {
        alert("fail");
    }
})
function showCourseBySno(data) {
    var str = "";
    for (var i = 0; i < data.length; i++) {
        str = "<tr>" +
            "<td>" + data[i].cno +  "</td>" +
            "<td>" + data[i].cname + "</td>" +
            "<td>" + data[i].tname + "</td>" +
            "<td>" + data[i].teachTime + "</td>" +
            "<td>" + data[i].teachWeek + "</td>" +
            "<td>" + data[i].address + "</td>" +
            "<td>" + data[i].telephone + "</td>" +
            "<td>" + data[i].email + "</td>" +
            "<td>" + data[i].credit + "</td>" +
            "<td></td>" +
            "</tr>";
        $("#tab").append(str);
    }
}
